< previous page page_13 next page >

Page 13
The next step in the design process is taking these functional definitions and translating them into a technical definition or pseudocode. Pseudocode is a style and a technique that allows you to define a function in such great detail that you can almost write the Visual Basic code from the pseudocode. The problem with the technique is that it's not as easy as it sounds, because most of us don't think like a computer. When you force yourself to create the pseudocode, however, you'll find that many technical issues that you didn't think of are discovered and added to the design or removed from the application. The following simple function demonstrates how pseudocode would look:
Duplicate Name Check
Input: Name of person being added to database.
Process:
Get input name
Initialize SQL statement to query the database for the input name
Execute the SQL statement
Check the query resultset
If no records are found - return a 0 to signal that no duplicate records were found
If a record was found - return a 1 to signal that the entry is a duplicate
Close the query
Exit function
Error Process:
If an error occurs
Display the error number and message to the user
Return the error number to indicate a problem occurred while checking the database
As you can see, because this is almost Visual Basic code by itself, translating it into actual Visual Basic code will be far easier than if you didn't do this type of designing.
Finally, you need to define the forms and reports you'll need according to the functions already defined. This is more difficult to do because there's really no set way of doing this type of design. You'll find many tips, concepts, and suggestions about form design (as covered later in this book); however, it really comes down to personal choice on how the forms will look.
With all of that said, remember that the design you finally come up with isn't set in concrete. You can and should go back over the design several times, looking for possible problems before you start creating the actual application. This critical review of your plans is an important part of the design process.
Coding
Well, you've done it. You made it past the design phase of your project. Be proud that you did; more than half of all application projects never make it this far. Now you're ready to start coding, but don't bite off more than you can work on at a time. Also, you

 
< previous page page_13 next page >

If you like this book, buy it!